package san60;

import java.text.DecimalFormat;
import java.util.Scanner;

public class Main {

    static double len = 0;
    static boolean isover = false;

    public static void dfs(int n,int[][] adder, boolean[] cache, int path, int curV, double curLen, int choose){
        if (isover) return;
        if (path == n){
            len = len > curLen ? len : curLen;
            isover =true;
            return;
        }

        for (int i=0;i<cache.length;i++ ){
            if (!cache[i] && i!=choose){
                int vChange = adder[choose][0] * adder[choose][1];
                double lenChange = curV*adder[choose][1] + 0.5*adder[choose][0]*adder[choose][1]*adder[choose][1];
                cache[i] = true;
                curV += vChange;
                curLen += lenChange;
            }
        }

        len = curLen;

    }


    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] adder = new int[n][2];

        for (int i=0;i<n;i++){
            int v = sc.nextInt();
            int t = sc.nextInt();
            adder[i][0] = v;
            adder[i][1] = t;
        }

        boolean[] cache = new boolean[n];

        len = 0;
        isover =false;

        for (int i=0;i<n;i++){
            dfs(n,adder,cache,0,0,0,i);
        }


        DecimalFormat decimalFormat = new DecimalFormat("#.0");
        String format = decimalFormat.format(len);
        System.out.print(format);

    }
}
